//
//  Message.swift
//  cangchu
//
//  Created by kang on 2021/11/26.
//

import Foundation

public enum MessageType: Int,Codable{
    case NONE = -1
    case AUTH = 0//注册链接
    case HEARTBEAT = 1//心跳
    case NOTICE = 2//通知
    case TEXT = 3//回调
    case CUSTOM = 4//透传
    case BIND = 5//绑定，解绑
    case RECEIPT = 6//回执
}

public class Message:Codable{
    var recordId:String?
    var time:String?
    var content:String?
    var deviceId:String?
    var messageType:MessageType = .NONE

    func getContent()->String{
        return ""
    }
}
